﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Wimm.Common.Entities;
using Wimm.Common.Interfaces.Utils;

namespace Wimm.Common.Interfaces.Repositories
{
    public interface IIncomeRepository: IRepository
    {
        Task<List<IncomeSource>> LoadAllSources(int? parentId);

        Task<IPagedResult<Income>> LoadPaged(IPagedRequest<Income> request);

        Task AddIncome(Income income);

        Task<Income> InsertIncome(Income newIncome);

        Task<Income> EditIncome(Income newIncome);

        Task<IncomeSource> LoadSourceById(int p);

        Task<IEnumerable<IncomeSource>> LoadCategories();

        Task<IReadOnlyCollection<CategoryGroup>> LoadGrouped(DateTime? from, DateTime? to, int userId);

        Task<IncomeSource> LoadCategoryById(int categoryId);

        Task<IncomeSource> LoadRootCategory(int categoryId);

        Task<DateTime> GetLimitDate(bool isMaxDate);
    }
}
